/*
 * @[H]:  Copyright (c) 2021 Phytium Information Technology, Inc. 
 * 
 *  SPDX-License-Identifier: Apache-2.0. 
 * 
 * @Date: 2021-07-13 18:54:26
 * @LastEditTime: 2021-07-14 22:27:00
 * @Description:  Description of file
 * @Modify History: 
 * * * Ver   Who        Date         Changes
 * * ----- ------     --------    --------------------------------------
 */
#include "f_spi.h"
#include "parameters.h"

extern FSpiConfig FSpiConfigTable[FSPI_DEVICE_NUM];

/**
 * @name: Ft_Uart_LookupConfig
 * @msg:  
 * @param {u32} instance_id 
 * @return {*}
 */
FSpiConfig *FspiLookupConfig(u32 instance_id)
{
    FSpiConfig *ptr = NULL;
    u32 index;

    for (index = 0; index < (u32)FT_UART_NUM; index++)
    {
        if (FSpiConfigTable[index].instance_id == instance_id)
        {
            ptr = &FSpiConfigTable[index];
            break;
        }
    }

    return (FSpiConfig *)ptr;
}
